<?php
/**
 * Created by PhpStorm.
 * User: m3lon3ly
 * Date: 2018/3/9
 * Time: 下午5:15
 */

$id = 4;
$partition = (int)($id / 20000);
$dir_addr = 'users/'.$partition;
if (!is_dir($dir_addr)) mkdir($dir_addr,0777,true); //  生成文件夹
file_put_contents($dir_addr.'/'.rand().'.json','1111');
print_r(1111);